package com.cema.manage.project.manage.versionUpdate.service;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.cema.manage.project.manage.configuration.service.IConfigurationService;
import com.cema.manage.project.manage.versionUpdate.domain.VersionUpdate;
import com.cema.manage.project.manage.versionUpdate.mapper.VersionUpdateMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * 版本更新 服务层实现
 *
 * @author reasahi
 * @date 2024-07-12
 */
@Service
public class VersionUpdateServiceImpl extends ServiceImpl<VersionUpdateMapper, VersionUpdate> implements IVersionUpdateService {

    @Resource
    private IConfigurationService iConfigurationService;

    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean insertVersion(VersionUpdate versionUpdate) {
        iConfigurationService.setConfigurations(versionUpdate.getVuChannelPackage());
        return insert(versionUpdate);
    }
}
